<template>
	<view class="post-about">
		<view class="content">
			<image v-for="(item, imgUrlsIndex) in images" :key="imgUrlsIndex" :src="item" mode="widthFix" lazy-load @tap="previewImage(imgUrlsIndex)"></image>

		</view>

	</view>
</template>
<script>
	const NAME = "recommend";
	export default {
		data() {
			return {
				images: [
					'https://h5.ylsp.vip/file/static/answerCore/answerCore-1.jpg',

					'https://h5.ylsp.vip/file/static/answerCore/answerCore-2.jpg',

					'https://h5.ylsp.vip/file/static/answerCore/answerCore-3.jpg',

					'https://h5.ylsp.vip/file/static/answerCore/answerCore-4.jpg',

					'https://h5.ylsp.vip/file/static/answerCore/answerCore-5.jpg',

					'https://h5.ylsp.vip/file/static/answerCore/answerCore-6.jpg',

					'https://h5.ylsp.vip/file/static/answerCore/answerCore-7.jpg',

					'https://h5.ylsp.vip/file/static/answerCore/answerCore-8.jpg'

				]
			}
		},
		watch: {
			$yroute(n) {
				if (n.name === NAME) {



				}
			}
		},
		onLoad: function() {

		},
		methods: {
			previewImage(current) {
				uni.previewImage({
					current,
					urls: this.images,
					success: function(data) {
						console.log("接口调用成功")
					},
					fail: function(err) {
						console.log(err.errMsg);
					}
				});
			}
		}
	}
</script>

<style scoped lang="less">
	.post-about {
		height: 100%;
		width: 100%;
		overflow-y: hidden;

		.content {
			height: 100%;
			width: 100%;
			overflow-y: auto;
			padding-top: 0rpx;
			image {
				width: 100%;
			}
		}
	}
</style>
